package com.itheima.manager.service.imp;

import com.itheima.manager.mapper.ContactMapper;
import com.itheima.manager.pojo.Contact;
import com.itheima.manager.service.ISelectAllService;
import com.itheima.manager.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class SelectAllServiceServiceImp implements ISelectAllService {




    @Override
    public List<Contact> selectAll() {
        SqlSession session = SqlSessionUtil.getSession();
        ContactMapper mapper = session.getMapper(ContactMapper.class);
        List<Contact> contacts = mapper.selectAll();

        return contacts;
    }
}
